# Update a custom action by ID

Update a custom action by ID

Endpoint: PUT /v2/custom-actions/{custom_action_id}/
Version: 1.0.0

## Path parameters:

  - `custom_action_id` (string, required)

## Request fields (application/json):

  - `name` (string)
    Custom action name

  - `type` (string)
    The UI component type for this custom action
    Enum: "button", "toggle", "radio", "dropdown"

  - `state` (string)
    The current operational state of the custom action
    Enum: "draft", "active", "inactive"

  - `position_in_blueprints` (string)
    The location in the blueprint where the custom action will be added
    Enum: "none", "blueprints_apps_and_configuration", "blueprints_connectivity", "blueprints_device_security", "blueprints_display_and_branding", "blueprints_esper_settings", "blueprints_scripts", "blueprints_files", "blueprints_platform_services", "blueprints_hardware_settings", "blueprints_sound", "blueprints_system_updates", "blueprints_time_and_date"

  - `position_in_device_settings` (string)
    The location in the device's Quick Actions where the custom action will be added
    Enum: "none", "device_quick_settings"

  - `properties` (object)
    Object for the description, info_message, and tooltip_message. Replaces the existing properties.

  - `options` (array)
    A new list of options to replace the existing ones

  - `options.label` (string, required)
    Label shown on the UI

  - `options.key` (string, required)
    Unique key identifier for the option

  - `options.scripts` (object, required)
    Platform-specific scripts. Currently only Linux platform is supported. Platform key must be lowercase "linux".

  - `options.scripts.linux` (object, required)

  - `options.scripts.linux.script` (string, required)
    The script content to be executed on Linux devices

  - `options.scripts.linux.interpreter` (string, required)
    Interpreter used to run the script. Default is "bash" if not specified. Common values include "bash", "sh", "python", "python3"

## Response 200 fields (application/json):

  - `content` (object)

  - `content.name` (string, required)
    Custom Action name

  - `content.type` (string, required)
    The UI component type for this custom action
    Enum: "button", "toggle", "radio", "dropdown"

  - `content.state` (string, required)
    The current operational state of the custom action. Only active custom actions can be deployed to Linux devices.
    Enum: "draft", "active", "inactive"

  - `content.position_in_blueprints` (string, required)
    The location in the blueprint where the custom action will be added
    Enum: "none", "blueprints_apps_and_configuration", "blueprints_connectivity", "blueprints_device_security", "blueprints_display_and_branding", "blueprints_esper_settings", "blueprints_scripts", "blueprints_files", "blueprints_platform_services", "blueprints_hardware_settings", "blueprints_sound", "blueprints_system_updates", "blueprints_time_and_date"

  - `content.position_in_device_settings` (string, required)
    The location in the device's Quick Actions where the custom action will be added
    Enum: "none", "device_quick_settings"

  - `content.properties` (object, required)
    Object for the description, info_message, and tooltip_message.

  - `content.id` (string, required)
    Unique identifier for the custom action

  - `content.options` (array, required)
    List of options for the custom action

  - `content.options.label` (string, required)
    Label shown on the UI

  - `content.options.key` (string, required)
    Unique key identifier for the option

  - `content.options.scripts` (object, required)
    Platform-specific script references. Currently only Linux platform is supported. Platform key must be lowercase "linux".

  - `content.options.scripts.linux` (object, required)

  - `content.options.scripts.linux.script_id` (string, required)
    Script identifier stored in external storage

  - `content.created_at` (string, required)
    When the custom action was created

  - `content.updated_at` (string, required)
    When the custom action was last updated

  - `content.created_by` (integer, required)
    User ID who created the custom action

  - `content.updated_by` (integer, required)
    User ID who last updated the custom action

  - `message` (string)

  - `code` (integer)
    Enum: 200

## Response 400 fields (application/json):

  - `message` (string)

  - `code` (integer)
    Enum: 400

## Response 404 fields (application/json):

  - `message` (string)

  - `code` (integer)
    Enum: 404

## Response 409 fields (application/json):

  - `message` (string)

  - `code` (integer)
    Enum: 409

## Response 500 fields (application/json):

  - `message` (string)

  - `code` (integer)
    Enum: 500


